package com.example.consulclient8889.feign;

import com.example.consulclient8889.failback.TestDemoFallBack;
import entity.TestDemo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.concurrent.ConcurrentHashMap;

//调用生产模块的具体模块名     ,fallback = TestDemoFallBack.class
@FeignClient(value="user8899",fallback = TestDemoFallBack.class)
public interface FeignUserClient {

    //生产模块儿具体的业务路径
    @GetMapping("/user/test")
    String test();


    //生产模块儿具体的业务路径
    @GetMapping("/user/infos_id")
    String testid(@RequestParam("id") int idd);

    @PostMapping("/user/postt")
    ConcurrentHashMap demopost(@RequestBody TestDemo demo);//对应生产者的具体接口


}
